package com.view;

import java.util.ArrayList;

import java.util.List;

import android.graphics.Canvas;
import android.view.MotionEvent;

import com.game.HitDie;
import com.game.HitEffect;
import com.game.HitPoint;
import com.game.Role;
import com.javenwong.android.engine.View;
import com.javenwong.android.engine.scene.Camera;

public class GameView extends View {
	public List<HitPoint> hitPointV = new ArrayList<HitPoint>();
	public List<HitEffect> hitEffectV = new ArrayList<HitEffect>();
	public List<HitDie> dieV = new ArrayList<HitDie>();
	private Camera camera = new Camera(null);

	public GameView() {
	}

	@Override
	public void logic() {
		 System.out.println(111);
	}

	@Override
	public void draw(Canvas g) {
		// TODO Auto-generated method stub
		// 画掉血
		for (int i = 0; i < hitPointV.size(); i++) {
			HitPoint hitPoint = (HitPoint) hitPointV.get(i);
			Role.drawSpecial(g, camera.getX(), camera.getY());
		}
		// 画掉灰
		for (int i = 0; i < hitEffectV.size(); i++) {
			HitEffect hitEffect = (HitEffect) hitEffectV.get(i);
			Role.drawEffect(g, camera.getX(), camera.getY());
		}
		// 画死
		for (int i = 0; i < dieV.size(); i++) {
			HitDie hitDie = (HitDie) dieV.get(i);
			Role.drawDie(g, camera.getX(), camera.getY());
		}
	}

	@Override
	protected void init() {
		// TODO Auto-generated method stub

	}

	@Override
	protected void destroy() {
		// TODO Auto-generated method stub

	}

	@Override
	public void onTouchEvent(MotionEvent event, float xF, float yF, int x, int y) {
		// TODO Auto-generated method stub

	}

	@Override
	public void onTouchDownEvent(MotionEvent event, float xF, float yF, int x, int y) {
		// TODO Auto-generated method stub

	}

	@Override
	public void onTouchUpEvent(MotionEvent event, float xF, float yF, int x, int y) {
		// TODO Auto-generated method stub

	}

	@Override
	public void onTouchMoveEvent(MotionEvent event, float xF, float yF, int x, int y) {
		// TODO Auto-generated method stub

	}

}
